
from lib.api.Teacher import tm
from hytest import GSTORE
from config.cfg import *


def suite_setup():
    ret = tm.add_teacher(username="anran", realname="安老师-数学老师",subjectid=SUBJECT_ID_JUNIOR_MATH,
                         classlist=str(GSTORE['七一班-id']), phonenumber="1234567",
                         email="anran@163.com", idcardnumber="123123")
    retAdd = ret.json()
    GSTORE['安老师-数学老师-id'] = retAdd['id']


def suite_teardown():
    teacherid = GSTORE['安老师-数学老师-id']
    tm.delete_teacher(teacherid=teacherid)
